package com.xiaolin.feign;

import com.xiaolin.common.utils.R;
import com.xiaolin.modules.course.entity.CourseEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * @ClassName CourseFeign
 * @Description TODO
 * @Detail 远程调用课程服务
 * @Author MyPC
 * @Date 2020/10/18
 * @Version 1.0
 */
@FeignClient(name = "education-course")
public interface CourseFeign {
    @RequestMapping("/course/course/list")
    R list(@RequestParam Map<String, Object> params);

    @RequestMapping("/course/course/info/{id}")
    R info(@PathVariable("id") Long id);

    @RequestMapping("/course/course/save")
    R save(@RequestBody CourseEntity course);

    @RequestMapping("/course/course/update")
    R update(@RequestBody CourseEntity course);

    @RequestMapping("/course/course/delete")
    R delete(@RequestBody Long[] ids);
}
